
package common;

public class HirelessRoomAttributeTag extends ItemAttributeTag {

  protected String createText() {
    HirelessRoomDetail room = (HirelessRoomDetail) item;

    if ((attribute == null) ||
        (attribute.equalsIgnoreCase("SectionName"))) {
      return (room.getSectionName());
    } else if (attribute.equalsIgnoreCase("building")) {
      return (room.getBuilding());
    } else if (attribute.equalsIgnoreCase("room")) {
      return (room.getRoom());
    } else if (attribute.equalsIgnoreCase("roomtype")) {
      return (room.getRoomType());    
    } else if (attribute.equalsIgnoreCase("id")) {
      return (String.valueOf(room.getId())); 
    } else if (attribute.equalsIgnoreCase("jzarea")) {
      return (String.valueOf(room.getJzArea()));
    } else return(null);
  }
}
